home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kopete / kopeteawayaction.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-19  |  2.5 KB  |  92 lines

  1. /*
  2.     kopetehistorydialog.h - Kopete Away Action
  3.  
  4.     Copyright (c) 2003     Jason Keirstead   <jason@keirstead.org>
  5.  
  6.     Kopete    (c) 2002 by the Kopete developers  <kopete-devel@kde.org>
  7.  
  8.    *************************************************************************
  9.     *                                                                       *
  10.     * This library is free software; you can redistribute it and/or         *
  11.     * modify it under the terms of the GNU Lesser General Public            *
  12.     * License as published by the Free Software Foundation; either          *
  13.     * version 2 of the License, or (at your option) any later version.      *
  14.     *                                                                       *
  15.     *************************************************************************
  16. */
  17.  
  18. #ifndef KOPETEAWAYACTION_H
  19. #define KOPETEAWAYACTION_H
  20.  
  21. #include <kdeversion.h>
  22. #include <kactionclasses.h>
  23. #include <kaction.h>
  24.  
  25. #include "kopete_export.h"
  26.  
  27. namespace Kopete
  28. {
  29.  
  30. class OnlineStatus;
  31.  
  32. /**
  33.  * @class Kopete::AwayAction
  34.  *
  35.  * Kopete::AwayAction is a KAction that lets you select an away message
  36.  * from the list of predefined away messages, or enter a custom one.
  37.  *
  38.  * @author Jason Keirstead   <jason@keirstead.org>
  39.  */
  40. class KOPETE_EXPORT AwayAction : public KSelectAction
  41. {
  42.     Q_OBJECT
  43.     public:
  44.         /**
  45.          * Constructor
  46.          * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and
  47.          * @p name are all handled by KSelectAction.
  48.          **/
  49.         AwayAction(const QString &text, const QIconSet &pix,
  50.                    const KShortcut &cut, const QObject *receiver, const char *slot,
  51.                    QObject *parent, const char *name = 0);
  52.  
  53.         /**
  54.          * Constructor
  55.          * @param status the OnlineStatus that appears in the signal
  56.          * @param slot must have the following signature:  ( const OnlineStatus &, const QString & )
  57.          * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and
  58.          * @p name are all handled by KSelectAction.
  59.          **/
  60.         AwayAction(const OnlineStatus &status, const QString &text, const QIconSet &pix,
  61.                    const KShortcut &cut, const QObject *receiver, const char *slot,
  62.                    QObject *parent, const char *name = 0);
  63.  
  64.         /**
  65.           * Destructor.
  66.           */
  67.         ~AwayAction();
  68.  
  69.     signals:
  70.         /**
  71.         * @brief Emits when the user selects an away message
  72.         */
  73.         void awayMessageSelected( const QString & );
  74.  
  75.          /**
  76.           * same as above, but with the saved status
  77.           */
  78.         void awayMessageSelected( const Kopete::OnlineStatus& , const QString & );
  79.  
  80.     private slots:
  81.         void slotAwayChanged();
  82.         void slotSelectAway( int index );
  83.  
  84.     private:
  85.         class Private;
  86.         Private *d;
  87. };
  88.  
  89. }
  90.  
  91. #endif
  92.